Conversation
|
Looking good to me. I think it'll be great to get mypy in tox. |
|
Done. I've added both mypy and flake8 into tox config. Keep in mind that mypy now produces errors, I propose to fix them later. Also, for that reason, I don't run mypy on CI just yet. Additionally, I've unlocked the flake8 version constraint since CI always installs the latest release. |
| nose==1.2.1 | ||
| flake8==1.7.0 | ||
| flake8 | ||
| mypy==0.910 |
| self._send_stat(stat, '%0.6f|ms' % delta, rate) | ||
|
|
||
| def incr(self, stat, count=1, rate=1): | ||
| def incr(self, stat: str, count: int = 1, rate: float = 1) -> None: |
There was a problem hiding this comment.
I think this might accept non-integer values, at least, there's a test for that case
Line 152 in aed9504
| def incr(self, stat: str, count: int = 1, rate: float = 1) -> None: | |
| def incr(self, stat: str, count: float = 1, rate: float = 1) -> None: |
|
There are now merge conflicts, and I don't work with pystatsd anymore. If anyone is interested in the proposed changes, feel free to pick up the changes from this PR and send a new PR based on it. I'll leave the branch and the fork alive if anyone is interested. |
There are a few type errors that require carefully changing the code. I decided to not do any drastic code changes just yet. So, adding mypy on CI is something to do in a follow-up PR.